<template>
    <div>
        <!-- 添加 -->
        <el-button type="primary" @click="willAdd">添加</el-button>
        <!-- 列表 -->
        <list-vue @willEdit="willEdit"></list-vue>
        <!-- 弹窗 -->
        <form-vue :info="info" ref="form"></form-vue>
    </div>
</template>
<script>
import listVue from "./components/list.vue";
import formVue from "./components/form.vue";
import { toggle } from "../../mixins/mixins"
import { mapGetters, mapActions } from "vuex";
import { requserlist, requsercount } from "../../http/api";
export default {
    components: {
        listVue,
        formVue,
    },
    props: [],
    mixins: [toggle],
    data() {
        return {
        }
    },
    computed: {
        ...mapGetters({}),
    },
    mounted() {
    },
    methods: {
        ...mapActions({}),
        //请求条数
        reqTotal() {
            requsercount().then(res => {
                if (res.data.code == 200) {
                    this.total = res.data.list[0].total
                }
            })
        },
    },
};
</script>
<style scoped lang="less">
@import "../../less/index.less";
</style>